#pragma once

#include <d3d9.h>
#include <d3dx9.h>

#include "../Solaire/ISprite.h"

class DirectXSprite : public ISprite
{
public:
	DirectXSprite( );
	void LoadTexture( int frameWidth, int frameHeight, LPDIRECT3DDEVICE9 device, LPCWSTR fileName );
	void Release();
	~DirectXSprite();

	void Draw( int frame, float rotation, float xPos, float yPos, bool flipped = false );
	LPDIRECT3DTEXTURE9 GetTexture();
private:
	LPDIRECT3DTEXTURE9 m_texture;
	int m_frameWidth;
	int m_frameHeight;
	int m_texWidth;
	int m_texHeight;
	int m_numFrames;
	LPD3DXSPRITE m_sprite;
};

